import http from "@/http";
//公告数据类型
export type Notice = {
    noticeId: string;
    cagegoryId:string;
    noticeTitle:string;
    noticeText:string;
}
//列表查询类型
export type NoticeList = {
    currentPage: number;
    pageSize:number;
    categoryId:string;
    noticeTitle:string;
}
//新增
export const addApi = (parm:Notice)=>{
    return http.post("/api/notice",parm)
}
//编辑
export const editApi = (parm:Notice)=>{
    return http.put("/api/notice",parm)
}
//列表
export const getListApi = (parm:NoticeList)=>{
    return http.get("/api/notice/list",parm)
}
//删除
export const deleteApi = (noticeId: string)=>{
    return http.delete(`/api/notice/${noticeId}`)
}